﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Corona.TagToolkit;
using System.IO;
using System.Threading;

namespace Corona.TagPresent
{
    /// <summary>
    /// Window1.xaml 的交互逻辑
    /// </summary>
    public partial class Window1 : Window
    {
        //private event EventHandler<Tag> OnSearch;
        //private event EventHandler<Tag> OnTagClick;
        AppSupport<File> CoronaSupport;
        public delegate void ActionEventHandler(object sender, string e);
        public static event ActionEventHandler Action;
        public Window1()
        {
            InitializeComponent();
        }


        private void button1_Click(object sender, RoutedEventArgs e)
        {
            //单击时/滑过时/……
            //TagInfo tagInfo = new GetTagContent(getTagContent);
            System.Diagnostics.Process.Start(@"E:\corona.rar");
            
        }

        void Window1_Action(object sender, string e)
        {
            String str = e.ToString();
            MessageBox.Show(str);
        }

        private void changeWeight(Tag tag) { }
        private void button4_Click(object sender, RoutedEventArgs e)
        {
            //
            //ChangeWeight changeWeight = new ChangeWeight(changeWeight);
        }

        private void button9_Click(object sender, RoutedEventArgs e)
        {

        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            //初始化操作
            //Corona.TagToolkit.AppSupport support = new Corona.TagToolkit.AppSupport();
            Thread initThread = new Thread(delegate()
            {
                PrepareInfo<File> prepareInfo = new PrepareInfo<File>(x => new File(x));
                CoronaSupport = prepareInfo.createAppSupport();
            });
            initThread.Start();
            
            
        }

        private void MD5Button_Click(object sender, RoutedEventArgs e)
        {

        }

        
    }
}
